package site.teamo.biu.net.common.web.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;
import site.teamo.biu.net.common.web.entity.SystemConfigDO;

/**
 * @author haocongshun
 * @date 2023/02/21 16:59:43
 */
@Mapper
@Component
public interface SystemConfigMapper extends BaseMapper<SystemConfigDO> {

    default void insertNotExists(SystemConfigDO systemConfigDO) {
        if (this.selectById(systemConfigDO.getId()) == null) {
            this.insert(systemConfigDO);
        }
    }

}
